// 库存管理接口
import request from "@/common/request.js";
const api = {
  machining_issue: "/machining_issue/",
  supplier:"/supplier/",
  machining:'/machining/',
  machining_product:'/machining_product/'

};

export function get_machining_issue(params) {
  return request({
    url: api.machining_issue,
    method: "get",
    params,
  });
}

export function get_supplier(params) {
  return request({
    url: api.supplier,
    method: "get",
    params,
  });
}

export function get_machining(params) {
  return request({
    url: api.machining,
    method: "get",
    params,
  });
}

export function machining_product_detail(params) {
  return request({
    url: api.machining_product,
    method: "get",
    params
  });
}

export function machining_issue_detail(id) {
  return request({
    url: api.machining_issue + id,
    method: "get",
  });
}

export function post_machining_issue(data) {
  return request({
    url: api.machining_issue,
    method: "post",
    data,
  });
}

export function patch_machining_issue(data, id) {
  return request({
    url: api.machining_issue + id + "/",
    method: "patch",
    data,
  });
}

export function delete_machining_issue(id) {
  return request({
    url: api.machining_issue + id + "/",
    method: "delete",
  });
}
